//
//  HMDefaultsTool.m
//  仿真开发
//
//  Created by Cloud on 2017/3/23.
//  Copyright © 2017年 B.HOPE. All rights reserved.
//

#import "HMDefaultsTool.h"

@implementation HMDefaultsTool

+ (void)saveBool:(BOOL)b forKey:(NSString *)key{
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setBool:b forKey:key];
    
}
+ (BOOL)boolForKey:(NSString *)key{
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return [defaults boolForKey:key];
    
}

+(void)saveObject:(id)object forKey:(NSString *)key{
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults setObject:object forKey:key];
    
}

+(id)objetForKey:(NSString *)key{
    
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    return [defaults objectForKey:key];
    
}

+ (void)removeObjectForKey:(NSString *)key{
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    [defaults removeObjectForKey:key];
}
@end
